<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--v-if-->
    <div id="app">
        <button @click="show = !show">点击切换</button><br/>
        <h1 v-if="show">
            你好
        </h1>

        <ul>
            <li v-for="(user,index) in users" :key="index" v-if="user.gender==='女'">
                {{index+1}} - {{user.name}} : {{user.gender}}:{{user.age}}
            </li>
        </ul>
        <!--v-else-->
        <div v-if="Math.random()>0.5">
            see me
        </div>
        <div v-else>
            gun
        </div>

        <!--v-else-if-->
        <div v-if="type === 'A'">
            A
        </div>
        <div v-else-if="type === 'B'">B</div>
        <div v-else-if="type === 'C'">C</div>
        <div v-else>not ABC</div>
    </div>



    <script src="../node_modules/vue/dist/vue.js"></script>
    <script type="text/javascript" >
    	let app = new Vue({
            el:'#app',
            data:{
                show:true,
                type:'C',
                users:[
                    {name:'柳岩', gender:'女', age: 21},
                    {name:'社会我拓哥', gender:'男', age: 30},
                    {name:'范冰冰', gender:'女', age: 24},
                    {name:'刘亦菲', gender:'女', age: 18},
                    {name:'古力娜扎', gender:'女', age: 25}
                ]
            }
        })
    </script>
</body>
</html>